<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{fragments/layout}">
<head>
	<meta charset="utf-8">
    <!-- 公共 -->
    <link rel="stylesheet" href="../../META-INF/resources/webjars/bootstrap/3.3.7/css/bootstrap.css" th:remove="all">
    <link rel="stylesheet" href="../../static/fonts/iconfont.css" th:remove="all">

	<script src="../../META-INF/resources/webjars/jquery/3.2.0/jquery.js" th:remove="all"></script>
	<script src="../../META-INF/resources/webjars/bootstrap/3.3.7/js/bootstrap.min.js" th:remove="all"></script>
	<script src="../../static/js/menu.js" th:remove="all"></script> 
    
    <!-- 后台样式 -->
    <link rel="stylesheet" href="../../static/css/manage.css" th:remove="all">
    <link rel="stylesheet" href="../../static/css/power.css" th:remove="all">
    
    <!--基础js-end -->
    <script type="text/javascript">
        var WEB_ROOT = '/demo';
    </script>

    <!-- 消息弹框  start -->
    <script src="../../static/js/system/webweigetutil.js" th:src="@{/js/system/webweigetutil.js}"></script>
    <script language="javascript" src="../../static/js/system/jquery.bootstrap.message.js" th:src="@{/js/system/jquery.bootstrap.message.js}"></script>
    <!-- 消息弹框  end -->
    <script src="../../META-INF/resources/webjars/bootstrap/3.3.7/js/bootstrap.js"></script>
    
    <!-- 树形插件  start-->
    <script src="../../static/js/system/treeview/bootstrap-treeview.js" th:src="@{/js/system/treeview/bootstrap-treeview.js}"></script>
    <script src="../../static/js-busi/common/treeview.service.js" th:src="@{/js-busi/common/treeview.service.js}"></script>
    <script src="../../static/js-busi/common/treeview.getdata.service.js" th:src="@{/js-busi/common/treeview.getdata.service.js}"></script>
   <!-- 树形插件  end-->
   
   <!-- common data-->
   	<script src="../../static/js-busi/common/commonData.js"></script>

    <script src="../../static/js-busi/staff/menuMgr.js" th:src="@{/js-busi/menu/menuMgr.js}"></script>

</head>
<body>
	
	<!-- 头部 -->
    <header class="m_header">
        <div class="wt1200 clearfix">
            <div class="m_header_leftWrap">
                <a href="" class="Logo" target="_blank">
                    <img src="../../static/images/logo_manager.png" alt="上海权益中心">
                </a>
                <em class="m_headName">亚信联通DEMO工程</em>
                <span>欢迎登陆亚信联通DEMO工程</span>
            </div>
            <ul class="m_hdlist clearfix">
                <li>
                    <a class="item" href="" target="_blank"><i class="iconfont icon-huiyuan1"></i>admin</a>
                </li>
                <li>
                    <a class="item" href="" target="_blank"><i class="iconfont icon-mima1"></i>修改密码</a>
                </li>
                <li>
                    <a class="item" href="../login/login.html" target=""><i class="iconfont icon-tuichu"></i>退出</a>
                </li>
            </ul>
        </div>
    </header>
    <!-- 头部 end-->
    
<div class="m_wrap1200 ">
    <!-- 右边主体 -->
    <div class="m_main" layout:fragment="screen_content">
        <div class="m_con">
            <div class="tabHead">
                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active"><a href="#tab01" aria-controls="home" role="tab" data-toggle="tab">菜单管理</a></li>
                </ul>
            </div>
            <!--菜单盒子开始-->
            <div class="cardBox">
                <div class="cardBox_left " style="min-height: 480px">
                    <div  id="menuManagerTreeView"></div>
                </div>
                <div class="cardBox_right " id="catInfoTab" style="width:74%">
                    <div class="cardBox_rightTop">
                        <div class="cardBox_rightrow">
                            <ul>
                                <li>菜单编码：<span id="menuCodeShow"></span></li>
                                <li>菜单名称：<span id="menuNameShow"></span></li>
                                <li>菜单类型：<span id="menuTypeNameShow"></span></li>
                                <li>菜单归属：<span id="menuBelongNameShow"></span></li>
                                <li>展示顺序：<span id="menuSortShow"></span></li>
                                <li>菜单URL：<span id="menuUrlShow"></span></li>
                                <input id="parentMenuCode" style="display: none" >
                            </ul>
                            <!-- 按钮 -->
                            <div class=" ml10">
                                <a href="javascript:void(0)" class="btn-primary btn mr10" onclick="popAddMenu()" >新增同级</a>
                                <a href="javascript:void(0)" class="btn-default btn mr10" onclick="popUpdateMenu()" >编辑</a>
                                <a href="javascript:void(0)" class="btn-default btn mr10" onclick="delMenuInfo()">删除</a>
                            </div>
                        </div>
                    </div>
                    <div class="cardBox_rightbottom mt15" id="menuChildList" style="display: none">
                        <p class="cardtitle">下级列表</p>
                        <!-- Tab panes -->
                        <div class="tab-content pt15">
                            <!--  未审核 -->
                            <div role="tabpanel" class="tab-pane active" id="tab01">
                                <div id="menuChildListTabDiv">
	                                <table id="menuChildListTab" class="table table-bordered text-center table-striped table-hover table-th-nowrap">
<thead>
    <tr class="active">
        <th>菜单编码</th>
        <th>菜单名称</th>
        <th>菜单URL</th>
        <th>菜单类型</th>
        <th>展示顺序</th>
        <th>菜单归属</th>
        <th width="">操作</th>
    </tr>
    </thead>
    <tbody>
    
    <tr>
        <td>100001</td>
        <td>用户管理</td>
        <td>/staff/toStaffList</td>
        <td>菜单</td>
        <td>1</td>
        <td>平台</td>
        <td>
            <p class="pop-link">
                <a href="#" onclick="operateMenuInfo(&#39;100001&#39;,&#39;用户管理&#39;,&#39;/staff/toStaffList&#39;,&#39;1&#39;)">编辑</a> <i>|</i>
                <a href="#" onclick="delMenuInfo(100001)">删除</a>
            </p>
        </td>
    </tr>
    <tr>
        <td>100002</td>
        <td>角色管理</td>
        <td>/role/toRoleList</td>
        <td>菜单</td>
        <td>2</td>
        <td>平台</td>
        <td>
            <p class="pop-link">
                <a href="#" onclick="operateMenuInfo(&#39;100002&#39;,&#39;角色管理&#39;,&#39;/role/toRoleList&#39;,&#39;2&#39;)">编辑</a> <i>|</i>
                <a href="#" onclick="delMenuInfo(100002)">删除</a>
            </p>
        </td>
    </tr>
    <tr>
        <td>1000203</td>
        <td>菜单管理</td>
        <td>/menu/menuManager</td>
        <td>菜单</td>
        <td>3</td>
        <td>平台</td>
        <td>
            <p class="pop-link">
                <a href="#" onclick="operateMenuInfo(&#39;1000203&#39;,&#39;菜单管理&#39;,&#39;/menu/menuManager&#39;,&#39;3&#39;)">编辑</a> <i>|</i>
                <a href="#" onclick="delMenuInfo(1000203)">删除</a>
            </p>
        </td>
    </tr>
    <tr>
        <td>1001001</td>
        <td>系统参数管理</td>
        <td>/systemParam/entryInit</td>
        <td>菜单</td>
        <td>4</td>
        <td>平台</td>
        <td>
            <p class="pop-link">
                <a href="#" onclick="operateMenuInfo(&#39;1001001&#39;,&#39;系统参数管理&#39;,&#39;/systemParam/entryInit&#39;,&#39;4&#39;)">编辑</a> <i>|</i>
                <a href="#" onclick="delMenuInfo(1001001)">删除</a>
            </p>
        </td>
    </tr>
    <tr>
        <td>1006409</td>
        <td>角色切换</td>
        <td>/switchloginstaff/toSwitchLoginStaffList</td>
        <td>菜单</td>
        <td>5</td>
        <td>平台</td>
        <td>
            <p class="pop-link">
                <a href="#" onclick="operateMenuInfo(&#39;1006409&#39;,&#39;角色切换&#39;,&#39;/switchloginstaff/toSwitchLoginStaffList&#39;,&#39;5&#39;)">编辑</a> <i>|</i>
                <a href="#" onclick="delMenuInfo(1006409)">删除</a>
            </p>
        </td>
    </tr>


    </tbody>
</table>
                                </div>
                                <!-- 分页-->

                                <div class="overflow-hidden clearfix" th:remove="all">
                                    <!-- pagerBar -->
                                    <div class="pagerBar" >
                                        <nav aria-label="Page navigation">
                                            <ul class="pagination">
                                                <li>
                                                    <a href="#" aria-label="Previous">
                                                        <span aria-hidden="true">上一页</span>
                                                    </a>
                                                </li>
                                                <li class="active"><a href="#">1</a></li>
                                                <li><a href="#">2</a></li>
                                                <li><a href="#">3</a></li>
                                                <li><a href="#">4</a></li>
                                                <li><a href="#">5</a></li>
                                                <li>
                                                    <a href="#" aria-label="Next">
                                                        <span aria-hidden="true">下一页</span>
                                                    </a>
                                                </li>
                                                <div class="pageskip">
                                                    <span class="pr10">到第<input type="text" class="pageskip_box">页</span>
                                                    <a href="" class="btn btn-default  btn_rec btn-sm">确定</a>
                                                </div>
                                            </ul>

                                        </nav>
                                    </div>
                                    <!-- pagerBar end-->
                                </div>
                                <a href="javascript:void(0)" class="btn-primary btn mr10" onclick="popAddChildMenu(1)" id="addMenuChild" >新增下级</a>
                                <a href="javascript:void(0)" class="btn-primary btn mr10" onclick="popAddChildMenu(2)" id="addMenuChildButton">新增按钮</a>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--菜单盒子结束-->
        </div>

    </div>

    <!-- 右边主体 end-->

    <!-- 左边菜单 -->
        <div class="m_nav">
            <div class="leftMenu">
                <div class="menu_list">
                    <ul>
	                    <li>
                            <p class="fuMenu"><i class="iconfont icon-tuichu"></i>我的工作台</p>
                            <div class="menu2">
                                <p class="zcd"><a style="display: block" href="../main/main.html">首页</a></p>
                            </div>
                        </li>
                        <li>
                            <p class="fuMenu"><i class="iconfont icon-mima1"></i>系统管理</p>
                            <div class="menu2">
                                <p class="zcd"><a style="display: block" href="staffList.html">用户管理</a></p>
                                <p class="zcd"><a style="display: block" href="roleList.html">角色管理</a></p>
                                <p class="zcd"><a style="display: block" href="menuManagerNew.html" class="active">菜单管理</a></p>
                                <p class="zcd"><a style="display: block" href="systemParam_Manage.html">系统参数管理</a></p>
                                <p class="zcd"><a style="display: block" href="switchloginstafflist.html">角色切换</a></p>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!-- 左边菜单 end-->
</div>

<div  layout:fragment="m_modal_screen_content">
    <!--增加菜单弹窗-->
    <div class="m_modal modal fade " id="popwin" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="width:400px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="menuAddTitle">新增菜单</h4>
                </div>
                <div class="modal-body clearfix pt20 pb20">
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单名称：</span><input id="menuNameAdd" type="text" placeholder="" class="form-control dis_inline"/></div>
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block"></p>菜单URL：</span><input id="menuUrlAdd" type="text" placeholder=""  class="form-control dis_inline"/></div>
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单类型：</span><select class="form-control wt220"><option value="0" id="menuTypeAdd">菜单</option></select></div>
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单排序：</span><input id="menuSortAdd" type="text" placeholder=""  class="form-control dis_inline"/></div>
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单归属：</span><select class="form-control wt220" id="menuBelongAdd"><option selected value="1">平台</option><option value="2">合作伙伴</option></select>
                    </div>

                </div>
                <div class="modal-footer">
                    <button id="menuSave" type="button" class="btn btn-primary" onclick="addMenuInfo()" gdsId="" targetStatus="" oldStatus="">保存</button>
                    <button id="menuBack" type="button" class="btn btn-primary" onclick="hideViewPop('add')" gdsId="" targetStatus="" oldStatus="">返回</button>
                </div>
            </div>
        </div>
    </div>

    <!--增加下级弹窗-->
    <div class="m_modal modal fade " id="popchildwin" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="width:400px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="doGdsStatusMenuModalTitle">新增按钮</h4>
                </div>
                    <div class="modal-body clearfix pt20 pb20">
                        <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单名称：</span><input id="menuNameChildAdd" type="text" placeholder="" class="form-control dis_inline"/></div>
                        <div class="popwin-row"><span><p class="col_red" style="display: inline-block"></p>菜单URL：</span><input id="menuUrlChildAdd" type="text" placeholder=""  class="form-control dis_inline"/></div>
                        <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单类型：</span><select class="form-control wt220" id="menuTypeChildAdd"></select></div>
                        <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单排序：</span><input id="menuSortChildAdd" type="text" placeholder=""  class="form-control dis_inline"/></div>
                        <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单归属：</span><select class="form-control wt220" id="menuBelongChildAdd"><option selected value="1">平台</option><option value="2">合作伙伴</option></select></div>
                    </div>
                <div class="modal-footer">
                    <button id="doGdsStatusModalConfirm" type="button" class="btn btn-primary" onclick="addMenuChildInfo()" gdsId="" targetStatus="" oldStatus="">保存</button>
                    <button id="menuBackCild" type="button" class="btn btn-primary" onclick="hideViewPop('addChild')" gdsId="" targetStatus="" oldStatus="">返回</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 编辑弹窗 -->
    <div class="m_modal modal fade " id="popApporval" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="width:400px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="doMenuChildEditTitle">编辑</h4>
                </div>
                <div class="modal-body clearfix pt20 pb20">
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单名称：</span><input id="menuNameEdit" type="text" placeholder="" class="form-control dis_inline"/></div>
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block"></p>菜单URL：</span><input id="menuUrlEdit" type="text" placeholder=""  class="form-control dis_inline"/></div>
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单排序：</span><input id="menuSortEdit" type="text" placeholder=""  class="form-control dis_inline"/></div>
                    <input id="menuCodeEdit" style="display: none">
                </div>
                <div class="modal-footer">
                    <button id="doMenuChildSaveConfirm" type="button" class="btn btn-primary" onclick="updateMenuInfo()" gdsId="" targetStatus="" oldStatus="">保存</button>
                    <button id="menuBackEditCild" type="button" class="btn btn-primary" onclick="hideViewPop('edit')" gdsId="" targetStatus="" oldStatus="">返回</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 编辑下级弹窗 -->
    <div class="m_modal modal fade " id="popApporvalChild" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="width:400px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="doMenuEditTitle">编辑</h4>
                </div>
                <div class="modal-body clearfix pt20 pb20">
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单名称：</span><input id="menuNameChildEdit" type="text" placeholder="" class="form-control dis_inline"/></div>
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block"></p>菜单URL：</span><input id="menuUrlChildEdit" type="text" placeholder=""  class="form-control dis_inline"/></div>
                    <div class="popwin-row"><span><p class="col_red" style="display: inline-block">*</p>菜单排序：</span><input id="menuSortChildEdit" type="text" placeholder=""  class="form-control dis_inline"/></div>
                    <input id="menuCodeChildEdit" style="display: none">
                </div>
                <div class="modal-footer">
                    <button id="doMenuSaveConfirm" type="button" class="btn btn-primary" onclick="updateMenuChildInfo()" gdsId="" targetStatus="" oldStatus="">保存</button>
                    <button id="menuBackEditCild" type="button" class="btn btn-primary" onclick="hideViewPop('editChild')" gdsId="" targetStatus="" oldStatus="">返回</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 删除弹窗-->
    <div class="m_modal modal fade" id="deleModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="width:400px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="doDelMenuTitle"></h4>
                </div>
                <div class="modal-body clearfix pt20 pb20" >
                    <h5 class="ptb30 f20 text-center">请确认要删除该菜单吗？</h5>
                </div>
                <div class="modal-footer">
                    <button id="doDelMenuConfirm" type="button" class="btn btn-primary" onclick="delMenuInfo(this)" gdsId="" targetStatus="" oldStatus="">确认</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
</div>



<script src="../../static/js/tree.js" th:remove="all"></script>
<script type="text/javascript">
		meunShow();
		showChoseMenu();
</script>

</body>
</html>